package com.goro;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import javax.ejb.EJB;
import javax.faces.model.SelectItem;

import com.joro.Subscription;
import com.joro.ejb.SubscriptionFacadeLocal;
public class SubscriptionBean {
	
	@EJB
	protected SubscriptionFacadeLocal subscriptionDao;
	private Subscription subscription;
	private int customerId;
	
	
	public int getCustomerId() {
		return customerId;
	}

	public void setCustomerId(int customerId) {
		this.customerId = customerId;
	}

	public SubscriptionBean() {
		subscription = new Subscription();
	}
	
	public Subscription getSubscription() {
		return subscription;
	}

	public void setSubscription(Subscription subscription) {
		this.subscription = subscription;
	}

	public Collection<Subscription> getSubscriptions(){
		return subscriptionDao.getSubscriptions();
	}
	
	public Collection<Subscription> getCustomerSubscriptions(){
		return null;//subscriptionDao.getCustomerSubscriptions(this.customerId);
	}
	
	public String deleteSubscription() {
		subscriptionDao.deleteSubscription(subscription);		
		return null;
	}
}
